package state.state.impl;

import state.OrderContext;
import state.state.OrderState;

/**
 * 具体状态 (Concrete States):已发货状态
 *
 * @author Liu Yicong
 * @date 2025/9/25
 */
public class ShippedState implements OrderState {
	@Override
	public void processOrder(OrderContext context) {
		System.out.println("订单已签收，状态从 [已发货] 转换为 [已完成]");
		context.setState(new DeliveredState());
	}

	@Override
	public void cancelOrder(OrderContext context) {
		System.out.println("警告：订单已发货，无法直接取消，需要走退货流程。");
	}
}
